package com.woniuxy.microsysserver.controller;

import com.woniuxy.common.bean.ResultMsg;
import com.woniuxy.microsysserver.bean.BanInfo;
import com.woniuxy.microsysserver.service.IBanService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("ban")
public class BanController {

    @Resource
    private IBanService banServiceImpl;

    @RequestMapping("/all")
    ResultMsg all(){
        List<BanInfo> all = banServiceImpl.findAll();
        ResultMsg resultMsg = new ResultMsg(true);
        resultMsg.setData(all);
        return resultMsg;
    }
}
